<ion-view view-title="短存宝" >
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">

        <ion-refresher pulling-text={{PULLING_TEXT}} pulling-icon="" refreshing-text={{REFRESHING_TEXT}}
                       on-refresh="doRefresh()"></ion-refresher>

        <input type="hidden" ng-model="channel.channelId" value="1332" keep-current-value/>
        <channel-img></channel-img>
        <!-- tab -->
        <div class="tab clearfix">
            <ul>
                <li ng-class="{current: vm.activeTab == 1}" id="1383" style="width:20%">
                    <em ng-click="vm.activeTab=1">7天</em></li>
                <li ng-class="{current: vm.activeTab == 2}" id="1385" style="width:20%">
                    <em ng-click="vm.activeTab=2">14天</em></li>
                <li ng-class="{current: vm.activeTab == 3}" id="1389" style="width:20%">
                    <em ng-click="vm.activeTab=3">30天</em></li>
                <li ng-class="{current: vm.activeTab == 4}" id="1391" style="width:20%">
                    <em ng-click="vm.activeTab=4">60天</em></li>
            </ul>
        </div>
        <!-- short -->

        <div class="term" ng-show="vm.activeTab == 1">
            <input type="hidden" ng-model="search1.channelId" value="1383" keep-current-value/>
            <div class="panel" ng-repeat="item in items | filter:search1:true">
                <a ng-href="#/tab/product-item/{{item.contentId}}">
                    <h2 class="item">{{item.contentName}}</h2>
                    <div class="item">
                        <p ng-if="item.prodStatus!=4"><em ng-class="{inc_ : item.prodYield < 0, inc : item.prodYield >= 0}">{{item.prodYield | defNumber :4}}<sub>%</sub></em>七日年化收益率</p>
                        <p ng-if="item.prodStatus==4"><em >{{item.ipoEndDate | defDateString}}</em>认购截止日</p>
                        <p><em>{{item.prodRealScale | defNumber :2}}<sub>亿</sub></em>已售份额</p>
                        <p><em ng-bind-html="item.prodMinSubscribe"></em>起购金额</p>
                    </div>
                </a>
            </div>
        </div>
        <div class="term" ng-show="vm.activeTab == 2">
            <input type="hidden" ng-model="search2.channelId" value="1385" keep-current-value/>
            <div class="panel" ng-repeat="item in items | filter:search2:true">
                <a ng-href="#/tab/product-item/{{item.contentId}}" >
                    <h2 class="item">{{item.contentName}}</h2>
                    <div class="item">
                        <p ng-if="item.prodStatus!=4"><em ng-class="{inc_ : item.prodYield < 0, inc : item.prodYield >= 0}">{{item.prodYield | defNumber :4}}<sub>%</sub></em>七日年化收益率</p>
                        <p ng-if="item.prodStatus==4"><em >{{item.ipoEndDate | defDateString}}</em>认购截止日</p>
                        <p><em>{{item.prodRealScale | defNumber :2}}<sub>亿</sub></em>已售份额</p>
                        <p><em ng-bind-html="item.prodMinSubscribe"></em>起购金额</p>
                    </div>
                </a>
            </div>
        </div>
        <div class="term" ng-show="vm.activeTab == 3">
            <input type="hidden" ng-model="search3.channelId" value="1389" keep-current-value/>
            <div class="panel" ng-repeat="item in items | filter:search3:true">
                <a ng-href="#/tab/product-item/{{item.contentId}}">
                    <h2 class="item">{{item.contentName}}</h2>
                    <div class="item">
                        <p ng-if="item.prodStatus!=4"><em ng-class="{inc_ : item.prodYield < 0, inc : item.prodYield >= 0}">{{item.prodYield | defNumber :4}}<sub>%</sub></em>七日年化收益率</p>
                        <p ng-if="item.prodStatus==4"><em >{{item.ipoEndDate | defDateString}}</em>认购截止日</p>
                        <p><em>{{item.prodRealScale | defNumber :2}}<sub>亿</sub></em>已售份额</p>
                        <p><em ng-bind-html="item.prodMinSubscribe"></em>起购金额</p>
                    </div>
                </a>
            </div>
        </div>
        <div class="term" ng-show="vm.activeTab == 4">
            <input type="hidden" ng-model="search4.channelId" value="1391" keep-current-value/>
            <div class="panel" ng-repeat="item in items | filter:search4:true">
                <a ng-href="#/tab/product-item/{{item.contentId}}">
                    <h2 class="item">{{item.contentName}}</h2>
                    <div class="item">
                        <p ng-if="item.prodStatus!=4"><em ng-class="{inc_ : item.prodYield < 0, inc : item.prodYield >= 0}">{{item.prodYield | defNumber :4}}<sub>%</sub></em>七日年化收益率</p>
                        <p ng-if="item.prodStatus==4"><em >{{item.ipoEndDate | defDateString}}</em>认购截止日</p>
                        <p><em>{{item.prodRealScale | defNumber :2}}<sub>亿</sub></em>已售份额</p>
                        <p><em ng-bind-html="item.prodMinSubscribe"></em>起购金额</p>
                    </div>
                </a>
            </div>
        </div>
    </ion-content>
</ion-view>